package com.roc.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.roc.dao.DaoException;
import com.roc.dao.IRiskDao;
import com.roc.newPage.IPageDao;
import com.roc.pojo.Operators;
import com.roc.pojo.ProfitPercent;
import com.roc.pojo.ProfitRule;
import com.roc.pojo.TblInsInf;
import com.roc.service.IRiskService;
import com.roc.service.IorgService;
import com.roc.service.ServiceException;

@Service("riskService")
@Transactional
public class IRiskServiceImpl implements IRiskService{
	private Logger logger=Logger.getLogger(IRiskServiceImpl.class);
	
	@Autowired
	private IPageDao pageDao;
	
	
	public List<Operators> queryrisk() throws ServiceException {
		List<Operators> riskList = new ArrayList<Operators>();
		
		
		try {
			Object[] params1 = {"00","12","13" };
			String hql="from Operators where status=?  and ( roleType=? OR  roleType=? )";
			List<?> lists = pageDao.queryAll(hql, params1);
			
          if(null != lists && lists.size() > 0){
				
				for (Object object : lists) {
					Operators operators = (Operators)object;
					riskList.add(operators);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
			logger.error("加载风控人员失败", e);
		}	
		return riskList;
	}


	}


